Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internal libgeotiff: resync with https://github.com/OSGeo/libgeotiff/pull/118 #10159

Merged
merged 4 commits into from
Jun 11, 2024

Conversation

rouault
Copy link
Member

@rouault rouault commented Jun 7, 2024

Continuation of #10158 , with OSGeo/libgeotiff#118 applied

@rouault rouault force-pushed the fix_10154_continuation branch 2 times, most recently from cdea40e to ab8043e Compare June 7, 2024 17:29
@coveralls
Copy link
Collaborator

Coverage Status

coverage: 69.164% (-0.001%) from 69.165%
when pulling ab8043e on rouault:fix_10154_continuation
into aa3d2b4 on OSGeo:master.

rouault added 4 commits June 8, 2024 04:48
…typically grads), when reading projection from ProjXXXXGeoKeys

Fixes OSGeo#10154

libgeotiff is unfortunately inconsistent. When it synthetizes the
projection parameters from the EPSG ProjectedCRS code, it returns
them normalized in degrees. But when it gets them from
ProjCoordTransGeoKey and other Proj....GeoKey's it return them in
a raw way, that is in the units of GeogAngularUnitSizeGeoKey
From GDAL 3.0 to 3.9.0, we didn't take the later case into account, and
lacked a conversion to degree.
And all versions of GDAL <= 3.9.0 when writing those geokeys, wrote
them as degrees, hence this GTIFF_READ_ANGULAR_PARAMS_IN_DEGREE
config option that can be set to YES to avoid that conversion and
assume that the angular parameters have been written as degree.
…typically grads), when writing ProjXXXXGeoKeys

Convert angular projection parameters from their normalized value in degree
to the units of GeogAngularUnitsGeoKey.
Note: for GDAL <= 3.9.0, we always have written them in degrees !
We can set GTIFF_WRITE_ANGULAR_PARAMS_IN_DEGREE=YES to get that
non-conformant behavior...

Relates to OSGeo#10154
@rouault rouault force-pushed the fix_10154_continuation branch from ab8043e to e509d34 Compare June 8, 2024 02:48
@coveralls
Copy link
Collaborator

Coverage Status

coverage: 69.166% (+0.002%) from 69.164%
when pulling e509d34 on rouault:fix_10154_continuation
into c7d3b7b on OSGeo:master.

@rouault rouault merged commit cf2f9d0 into OSGeo:master Jun 11, 2024
35 checks passed
@rouault
Copy link
Member Author

rouault commented Jun 11, 2024

The backport to release/3.9 failed:

The process '/usr/bin/git' failed with exit code 1
stderr
error: could not apply e509d3438e... Internal libgeotiff: resync with https://github.com/OSGeo/libgeotiff/pull/118
hint: After resolving the conflicts, mark them with
hint: "git add/rm <pathspec>", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".
hint: Disable this message with "git config advice.mergeConflict false"

stdout
Auto-merging frmts/gtiff/gt_wkt_srs.cpp
CONFLICT (content): Merge conflict in frmts/gtiff/gt_wkt_srs.cpp

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-release/3.9 release/3.9
# Navigate to the new working tree
cd .worktrees/backport-release/3.9
# Create a new branch
git switch --create backport-10159-to-release/3.9
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick 2bda0b9659e6c3c2d266a9eed0dc637c38cdc58e,26c163d1938ad4a7ea5de43eea0fa9e4d6ffc7bd,5ecffdf697be4882b39877cf4dd2a0cb91411812,e509d3438e053ffc7c537a95e89d517013348541
# Push it to GitHub
git push --set-upstream origin backport-10159-to-release/3.9
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-release/3.9

Then, create a pull request where the base branch is release/3.9 and the compare/head branch is backport-10159-to-release/3.9.

@rouault
Copy link
Member Author

rouault commented Jun 11, 2024

3.9 backport in #10192

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants